cmake_minimum_required(VERSION 3.1)

project(C++11)
# 设置C++标准为 C++ 11
# set(CMAKE_CXX_STANDARD 11)
# 设置C++标准为 C++ 14
set(CMAKE_CXX_STANDARD 14)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g")
add_executable(1-1-error-example 1-1-error-example.cpp)
add_executable(1-2-shared_ptr-app 1-2-shared_ptr-app.cpp)
target_link_libraries(1-2-shared_ptr-app pthread)
add_executable(1-3-1-delete 1-3-1-delete.cpp)
add_executable(1-3-1-reset-count 1-3-1-reset-count.cpp)
add_executable(1-3-2-cycle-shared-ptr 1-3-2-cycle-shared-ptr.cpp)
add_executable(1-3-2-shared_from_this 1-3-2-shared_from_this.cpp)
add_executable(1-3-2-shared_from_this2 1-3-2-shared_from_this2.cpp)
add_executable(1-4-unique_ptr 1-4-unique_ptr.cpp)
add_executable(1-4-unique_ptr-deleter 1-4-unique_ptr-deleter.cpp)
add_executable(1-5-1-weak_ptr 1-5-1-weak_ptr.cpp)
target_link_libraries(1-5-1-weak_ptr pthread)
add_executable(1-5-4-misuse-weak_ptr 1-5-4-misuse-weak_ptr.cpp)
add_executable(2-1-lr_value 2-1-lr_value.cpp)
add_executable(2-1-mystring 2-1-mystring.cpp)
add_executable(2-2-3-1-r-move 2-2-3-1-r-move.cpp)
add_executable(2-2-3-2-r-move 2-2-3-2-r-move.cpp)
add_executable(2-3-1-memory 2-3-1-memory.cpp)
add_executable(2-3-1-memory2 2-3-1-memory2.cpp)
add_executable(2-3-1-memory3 2-3-1-memory3.cpp)
add_executable(2-3-2-move 2-3-2-move.cpp)
add_executable(2-3-3-forward1 2-3-3-forward1.cpp)
add_executable(2-3-3-forward2 2-3-3-forward2.cpp)
add_executable(2-3-4-emplace_back 2-3-4-emplace_back.cpp)
add_executable(2-3-4-emplace_back2 2-3-4-emplace_back2.cpp)
add_executable(3-lambda 3-lambda.cpp)
add_executable(4-priority_queue 4-priority_queue.cpp)
add_executable(4-unordered_map 4-unordered_map.cpp)